﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Board.Models
{
    public class WebLog
    {

        public static bool LogValueChanged(DbEntities db, string table, string field, string oldValue, string newValue)
        {
            if ((oldValue + "").Equals(newValue + "")) return false;
            db.t_LogValues.Add(new t_LogValues()
            {
                Table = table+"",
                Field = field+"",
                OldValue = oldValue,
                NewValue = newValue,
                ModifiedBy = Tools.CurrentUser.UserId,
                ModifiedDate = DateTime.Now
            });
            return true;
        }

    }
}